package com.wiloon.java8x.dataImport;

import com.wiloon.java8x.datadictionary.DatabaseTable;

import java.util.ArrayList;
import java.util.List;

/**
 * Created by Administrator on 2015/5/27.
 */
public class DataImportTask {
    private String sourceUrl;
    private int sourceSheetIndex;
    private int titleRowIndex;
    private DatabaseTable targetTable;
    private List<ColumnMap> columnMaping;
    private String createByColumnKey;
    private int createById;

    public void addColumnMap(ColumnMap columnMap) {
        if (columnMaping == null) {
            columnMaping = new ArrayList<>();
        }
        columnMaping.add(columnMap);
    }

    public String getSourceUrl() {
        return sourceUrl;
    }

    public void setSourceUrl(String sourceUrl) {
        this.sourceUrl = sourceUrl;
    }

    public int getSourceSheetIndex() {
        return sourceSheetIndex;
    }

    public void setSourceSheetIndex(int sourceSheetIndex) {
        this.sourceSheetIndex = sourceSheetIndex;
    }

    public DatabaseTable getTargetTable() {
        return targetTable;
    }

    public void setTargetTable(DatabaseTable targetTable) {
        this.targetTable = targetTable;
    }

    public int getTitleRowIndex() {
        return titleRowIndex;
    }

    public void setTitleRowIndex(int titleRowIndex) {
        this.titleRowIndex = titleRowIndex;
    }

    public List<ColumnMap> getColumnMaping() {
        return columnMaping;
    }

    public void setColumnMaping(List<ColumnMap> columnMaping) {
        this.columnMaping = columnMaping;
    }

    public int getCreateById() {
        return createById;
    }

    public void setCreateById(int createById) {
        this.createById = createById;
    }

    public String getCreateByColumnKey() {
        return createByColumnKey;
    }

    public void setCreateByColumnKey(String createByColumnKey) {
        this.createByColumnKey = createByColumnKey;
    }
}
